<?php $this->placeholder('toolbar')->captureStart() ?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => 'insert')))) ?>
<?php echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
<?php $this->placeholder('toolbar')->captureEnd() ?>

<form id="adminForm" name="adminForm" method="post" action="">	
	<div class="clr"> </div>
	<table class="adminlist">
		<thead>
			<tr>
				<?php echo $this->partial('index/manage/no-save-order.phtml', 'admin', array('column'=>'unit_order')); ?>
				<th width="1%"><input type="checkbox" id="checkall" /></th>
				<th width="10%">Mã nhóm người dùng</th>
				<th >Tên nhóm người dùng</th>
				<th>Ghi chú</th>
				<th width="5%">Phân quyền</th>
				<th width="5%">Quản lý</th>
	         </tr>
		</thead>
      	<tbody>
        <?php $i = 0 ?>
        <?php foreach ($this->paginator as $row): ?>
        	
        	<?php $temp = '' ?>
			<?php for ($j = 1; $j <= (int)$row->group_level; $j++): ?>
				<?php $temp .= '<span class="gi">|&mdash;</span>'; ?>
			<?php endfor ;?>
        
        	<tr class='row<?php echo ($i++)%2 ?>' >
	            <?php echo $this->partial('index/manage/order.phtml', 'admin', array($i)) ?>
				<?php echo $this->partial('index/manage/checkbox.phtml', 'admin', array($row->group_id)) ?>
				<td class="is_code">
	            	<?php echo $row->group_code ?>	            	
	            </td>
	            <td >
	            	<?php echo $temp.$row->group_name ?>	            	
	            </td>
	            <td><?php echo $this->escape($row->group_note); ?></td>
	            <td class="center" >
	            	<?php echo $this->partial('index/manage/icon.phtml', 'admin',array("title"=>"Phân quyền","href"=>$this->url(array('action' => 'assign', 'id'=>$row->group_id)) ,"class"=>"icon-16-help-security")) ?>
	            </td>
	            <td class="center" >
	            	<?php echo $this->partial("index/manage/edit.phtml","admin", array($this->url(array('action' => 'update','id'=>$row->group_id)))); ?>
					<?php echo $this->partial("index/manage/trash.phtml","admin", array($this->url(array('action' => 'delete')))); ?>
				</td>
         	</tr>
        <?php endforeach; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="100"><div class="container"><?php echo $this->paginationControl($this->paginator) ?> </div></td>
			</tr>
		</tfoot>
   	</table>
</form>

